/*
 *  Point.h
 *  zray-gui
 *
 *  Created by czalkin on 2/19/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef POINT3_H_
#define POINT3_H_

#include "Vector3.hpp"

class Point3
{
	friend class Vector3;
	
public:
	Point3()
	{
		v[0] = 0.0f;
		v[1]=0.0f;
		v[2]=0.0f;
	}
	
	Point3( const Vector3 &vin );
	
	Point3( float x, float y, float z )
	{
		v[0] = x;
		v[1] = y;
		v[2] = z;
	}
	
	Point3& operator+=( const Vector3 &rhs );
	Point3 operator=( const Vector3 &rhs );
	Point3 operator+( const Vector3 &rhs ) const;
	Point3 operator-( const Point3 &rhs ) const;
	
	float operator[](const int index) const { return v[index]; }
	
	float dot( const Point3 &rhs ) const;
	float dot( const Vector3 &rhs ) const;

	float v[3];
};

#endif
